package com.molichuxing.gateway.api.services;


import com.molichuxing.framework.dto.Paged;
import com.molichuxing.framework.result.ResponseResult;
import com.molichuxing.gateway.bff.dealer.entity.request.create.DealerCreateVo;
import com.molichuxing.gateway.bff.dealer.entity.request.create.DealerGoodsCreateVo;
import com.molichuxing.gateway.bff.dealer.entity.request.create.FenceCreateVo;
import com.molichuxing.gateway.bff.dealer.entity.request.create.StoreCreateVo;
import com.molichuxing.gateway.bff.dealer.entity.request.modify.*;
import com.molichuxing.gateway.bff.dealer.entity.response.*;
import com.molichuxing.gateway.bff.goods.entity.response.GoodsVo;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * 经销商相关接口
 *
 * @author zhaopenghui
 * @date 2019年8月27日
 */
public interface DealerApiService {

    /**
     * 获取经销商列表
     *
     * @param params
     * @param pageNum
     * @param pageSize
     * @return
     */
    public ResponseResult<Paged<DealerListVo>> getDealerPage(Map<String, Object> params, Integer pageNum, Integer pageSize);


    /**
     * 详情-获取经销商基础信息
     *
     * @param dealerId
     * @return
     * @throws Exception
     */
    public ResponseResult<DealerInfoVo> getDealerInfo(Integer dealerId);

    /**
     * 详情-电子章信息
     *
     * @param dealerId
     * @return
     * @throws Exception
     */
    public ResponseResult<DealerEsignInfoVo> getDealerEsignInfo(Integer dealerId);

    /**
     * 编辑经销商信息
     *
     * @param DealerModifyVo
     * @return
     */
    public ResponseResult<Boolean> modifyDealer(DealerModifyVo DealerModifyVo);

    /**
     * 编辑经销商营业状态
     *
     * @param dealerModifyStatusVo
     * @return
     */
    public ResponseResult<Boolean> modifyDealerStatus(DealerModifyStatusVo dealerModifyStatusVo);

    /**
     * 添加经销商
     *
     * @param dealerCreateVo
     * @return
     */
    public ResponseResult<Boolean> createDealer(DealerCreateVo dealerCreateVo);

    /**
     * 经销商门店联动
     *
     * @return
     */
    public ResponseResult<List<DealerStoreVo>> getDealerStore(Integer status, Integer type, Integer dealerId, Boolean dealerIsShow);

    /**
     * 经销商列表
     *
     * @return
     */
    public ResponseResult<List<DealerVo>> getDealerList();

    /**
     * 经销商模糊查询
     *
     * @return
     */
    public ResponseResult<List<DealerVo>> getDealerByShortNameFuzzy(String dealerName, Integer status, Integer type);

    /**
     * 获取门店列表
     *
     * @param params
     * @param pageNum
     * @param pageSize
     * @return
     */
    public ResponseResult<Paged<StoreVo>> getStorePage(Map<String, Object> params, Integer pageNum, Integer pageSize);

    /**
     * 编辑门店信息
     *
     * @param storeModifyVo
     * @return
     */
    public ResponseResult<Boolean> modifyStore(StoreModifyVo storeModifyVo);

    /**
     * 编辑门店状态
     *
     * @param storeModifyStatusVo
     * @return
     */
    public ResponseResult<Boolean> modifyStoreStatus(StoreModifyStatusVo storeModifyStatusVo);

    /**
     * 添加门店
     *
     * @param storeCreateVo
     * @return
     */
    public ResponseResult<Boolean> createStore(StoreCreateVo storeCreateVo);


    /**
     * 门店审核
     *
     * @param storeModifyVerifyStatusVo
     * @return
     */
    public ResponseResult<Boolean> modifyStoreVerifyStatus(StoreModifyVerifyStatusVo storeModifyVerifyStatusVo);

    /**
     * 门店详情
     *
     * @param storeId
     * @return
     */
    public ResponseResult<StoreInfoVo> getStoreInfo(Integer storeId);


    /**
     * 获取经销商商品分销信息列表
     *
     * @param params
     * @param pageNum
     * @param pageSize
     * @return
     * @throws Exception
     */
    public ResponseResult<Paged<DealerGoodsVo>> getDealerGoodsPage(Map<String, Object> params, Integer pageNum, Integer pageSize) throws Exception;

    /**
     * 根据经销商ID获取商品信息列表
     *
     * @param dealerId
     * @param goodsType
     * @param carStyleId
     * @return
     */
    public ResponseResult<List<GoodsVo>> getDealerGoodsList(Integer dealerId, Integer goodsType, Integer carStyleId);

    /**
     * 修改经销商的分销商品
     *
     * @param goodsIds
     * @param dealerIds
     * @return
     */
    public ResponseResult<Boolean> modifyGoodsDealer(DealerGoodsCreateVo createVo) throws Exception;

    /**
     * 查询存在经销商的省份信息
     *
     * @return
     */
    public ResponseResult<List<DealerProvinceVo>> getDealerProvince();

    /**
     * 根据省id查询经销商信息
     *
     * @param provinceId 省id
     * @return
     */
    public ResponseResult<List<DealerVo>> getDealerByProvinceId(Integer provinceId);

    /**
     * 根据经销商id查询门店信息
     *
     * @param dealerId 经销商id
     * @return
     */
    public ResponseResult<List<StoreVo>> getStoreByDealerId(Integer dealerId);


    /**
     * 根据经销商id查询营业中门店信息
     *
     * @param dealerId 经销商id
     * @return
     */
    public ResponseResult<List<StoreVo>> getOpenStoreByDealerId(Integer dealerId);


    /**
     * 门店围栏
     *
     * @return
     */
    public ResponseResult<Boolean> createStoreFence();

    /**
     * 根据参数获取经销商
     *
     * @return
     */
    public ResponseResult<List<DealerVo>> getDealerListByParam(Map<String, Object> param);

    /**
     * 获取已有围栏列表
     *
     * @param storeId
     * @return
     */
    public ResponseResult<List<FenceVo>> getBindingFenceList(Integer storeId);

    /**
     * 获取未绑定围栏列表
     *
     * @param storeId
     * @return
     */
    public ResponseResult<List<FenceVo>> getUnBindingFenceList(Integer storeId);

    /**
     * 解除围栏
     *
     * @param fenceModifyVo
     * @return
     */
    public ResponseResult<Boolean> deleteFence(FenceModifyVo fenceModifyVo);

    /**
     * 添加围栏
     *
     * @param fenceCreateVo
     * @return
     */
    public ResponseResult<Boolean> createFence(FenceCreateVo fenceCreateVo);

}


